package com.jk.dmconsumer.controller;

import com.jk.dmcommon.entity.UserEntity;
import com.jk.dmconsumer.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @描述
 * @参数 $
 * @返回值 $
 * @创建人 lgf
 * @创建时间 $
 * @修改人和其它信息
 */
@RestController
@RequestMapping("phone")
public class PhoneController {
    @Autowired
    private PhoneService phoneService;
    /**
     * @description:  查询用户手机号
     * @param: [user]
     * @return: java.lang.String
     * @author lgf
     * @date: 2021/9/7 19:27
     */
    @RequestMapping("findPhone")
    public Object findPhone(Integer userId){

        return phoneService.findPhone(userId);
    }

    @RequestMapping("update")
    public void update(UserEntity user){
        phoneService.update(user);
    }

    @RequestMapping("updatePhone")
    public void updatePhone(UserEntity user){
        phoneService.updatePhone(user);
    }

    //修改邮箱
    @RequestMapping("addyou")
    public void addyou(UserEntity user){
        phoneService.addyou(user);
    }

    //实名认证
    @RequestMapping("adddcard")
    public Object adddcard(UserEntity user){
        return phoneService.adddcard(user);
    }



}
